package com.qf.test.service;

import com.qf.test.dao.UserDao;
import com.qf.test.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public List<User> findAll() {
        List<User> list = userDao.findAll();
        return list;
    }

    @Override
    public User findId(Integer id) {
        User user = userDao.findId(id);
        return user;


    }

    @Override
    public int deleted(Integer id) {
        return userDao.deleted(id);

    }

    @Override
    public User insretinone(User user) {
        int count = userDao.insretinone(user);
        return user;
    }

    @Override
    public User update(User user) {
        int i = userDao.updateUser(user);
        return user;
    }
}
